//package qj.tool.jna;
//
//import com.sun.jna.examples.win32.W32API.HWND;
//
//public class JnaTest {
//	public static void main(String[] args) {
//		User32 user32 = User32.INSTANCE;
//		HWND hwnd = user32.FindWindow(null, "Facebook | Home - Google Chrome");
////		setWindowAlpha(hwnd, 1);
//		setWindowVisible(hwnd, true);
////		user32.
//	}
//	private static void setWindowVisible(HWND hwnd, boolean visible) {
//		User32 user32 = User32.INSTANCE;
//		int flags = user32.GetWindowLong( hwnd, User32.GWL_STYLE );
//
////		flags |= User32.WS_VISIBLE;
//		flags &= ~User32.WS_VISIBLE;
//		user32.SetWindowLong(hwnd, User32.GWL_STYLE, flags);
//	}
//
//	private static void setWindowAlpha(HWND hwnd, double alpha) {
//		User32 user32 = User32.INSTANCE;
//		int flags = user32.GetWindowLong(hwnd, User32.GWL_EXSTYLE);
//		
//        if (alpha == 1) {
//			flags &= ~User32.WS_EX_LAYERED;
//			user32.SetWindowLong(hwnd, User32.GWL_EXSTYLE, flags);
//		} else {
//			flags |= User32.WS_EX_LAYERED;
//	        user32.SetWindowLong(hwnd, User32.GWL_EXSTYLE, flags);
//			byte level = (byte)((int)(255 * alpha) & 0xFF);
//	        user32.SetLayeredWindowAttributes(hwnd, 0, level,
//	                                        User32.LWA_ALPHA);
//		}
//	}
//}
